# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-yara
_pkgname=yara-python
pkgver=4.0.5
pkgrel=4
pkgdesc='Python interface for YARA.'
url='https://pypi.org/project/yara-python/#files'
arch=('x86_64' 'aarch64')
license=('Apache')
depends=('python2' 'yara')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('aa6c06c11103b25217a7c7802769d1db5020be04994a4626dd9928ab58db23f14aabe67c24b98e81ece60a879562e222c3695811b22c3cd081d363b60d41fc18')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

